package com.dlc.felear.xiaoensale.utils;

import android.content.Context;

import com.dlc.felear.xiaoensale.R;
import com.dlc.felear.xiaoensale.customView.ShowMsgDialog;

public class ShowQRDialogUtil {
    private Context context;
    private ShowMsgDialog dialog;
    private static ShowQRDialogUtil instance;

    public static ShowQRDialogUtil getInstance(Context context) {
        if (instance == null) {
            instance = new ShowQRDialogUtil(context);
        }
        return instance;
    }

    private ShowQRDialogUtil(Context context) {
        this.context = context;
        dialog = new ShowMsgDialog(context, R.style.showMsgDialog);
    }


    public void show(String title, String msg) {
        if (dialog != null) {
            dialog.setTtitle(title);
            dialog.setMsg(msg);
            dialog.showDialog();
        }

    }

    public void show(String title, String msg, String url) {
        if (dialog != null) {
            dialog.setTtitle(title);
            dialog.setQr(url);
            dialog.setMsg(msg);
            dialog.showDialog();
        }

    }


}
